#ifndef _UNIFY_SYS_DEFAULT_RUNNABLE_H_
#define _UNIFY_SYS_DEFAULT_RUNNABLE_H_

#include "thread.h"
#include "runnable.h"

namespace unifysys {

class CThread;
class CDefaultRunnable : public Runnable {
public:
	CDefaultRunnable(int threadNum = 1);
	virtual ~CDefaultRunnable();

	void setThreadNum(int threadNum);
	int start();
	void stop();
	void wait();

public:
	virtual void run(CThread* thread, void* arg);

protected:
	int 			_thread_num;
	bool		_stop;
	CThread*	_thread;
};

}

#endif